<!-- 订单相关信息 -->
<template>
  <view class="bgf mt-15">
    <view class="info-title mx-15 fz-16 fw-7 borderBottom">
      <view>实付金额</view>
      <view class="pliceText">{{ formatMoney({ money: price, showFreeText: true }) }}</view>
    </view>
    <!-- <view class="mx-15 py-10 borderBottom">
      <view class="cellBox">
        <view>解锁价格</view>
        <view>100</view>
      </view>
      <view class="cellBox">
        <view>优惠价</view>
        <view>100</view>
      </view>
      <view class="cellBox pliceText">
        <view>合计</view>
        <view>100</view>
      </view>
    </view> -->
    <view class="mx-15 py-10">
      <view class="cellBox">
        <view>订单编号</view>
        <view>{{ orderCode }}</view>
      </view>
      <view class="cellBox">
        <view>创建时间</view>
        <view>{{ createTime }}</view>
      </view>
      <view v-if="payTime" class="cellBox">
        <view>支付时间</view>
        <view>{{ payTime }}</view>
      </view>
    </view>
  </view>
</template>

<script lang="ts" setup>
  import { formatMoney } from '@/utils/number';
  import { propTypes } from '@/utils/propTypes';

  defineProps({
    price: propTypes.number.def(0),
    orderCode: propTypes.string,
    createTime: propTypes.string,
    payTime: propTypes.string,
  });
</script>
<style lang="scss" scoped>
  .info-title {
    height: 100rpx;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 28rpx;
    color: #333;
    font-weight: bold;
  }
  .cellBox {
    display: flex;
    justify-content: space-between;
    align-items: center;
    line-height: 60rpx;
    color: #808080;
    font-size: 28rpx;
  }
  .pliceText {
    color: #b47026;
    font-weight: bold;
  }
</style>
